#ifndef APPLICATIONENGINE_H
#define APPLICATIONENGINE_H

#include <QObject>
#ifdef Q_OS_WIN
#include <QtWidgets/QSystemTrayIcon>
#endif
#include <QScreen>
#include <QQmlError>
#include <QQmlApplicationEngine>
#include <QQmlPropertyMap>

class ApplicationEngine : public QQmlApplicationEngine
{
    Q_OBJECT

public:
    ApplicationEngine(QObject *parent = 0);
public:
    int create();

public slots:
    void logWarnings(const QList<QQmlError> & warnings);
    void qmlObjectCreated(QObject * object, const QUrl & url);
public:
    static void redirection(QtMsgType type, const QMessageLogContext &context, const QString &description);
private:
#ifdef Q_OS_WIN
    QSystemTrayIcon m_tray;
#endif
};

#endif // APPLICATIONENGINE_H
